#!/usr/bin/php
<?php

mysql_connect("localhost","infopark_com_ua","8888zG6Wtv1k");
mysql_select_db("dev_infopark_com_ua1");




$result=mysql_query("SELECT * FROM `node` WHERE type='advert'");
while($r=mysql_fetch_assoc($result))
  {
    $sql1="INSERT INTO node_advert_dates (nid,public_date) VALUES (".$r['nid'].",'".date('Y-m-d')."')";
    print $sql1."\n";
    mysql_query($sql1);
    }
?>